﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:h="clr-namespace:HSS.Interlink.UI" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:System="clr-namespace:System;assembly=mscorlib" mc:Ignorable="d">

	<!-- ContextMenuView -->
	<Style TargetType="h:ContextMenuView">
		<Setter Property="BorderThickness" Value="0" />
		<Setter Property="Background" Value="#FFEFEFEF" />
		<Setter Property="ItemContainerStyle">
			<Setter.Value>
				<Style TargetType="ListBoxItem">
					<Setter Property="Padding" Value="0" />
					<Setter Property="HorizontalContentAlignment" Value="Left" />
					<Setter Property="VerticalContentAlignment" Value="Top" />
					<Setter Property="Background" Value="Transparent" />
					<Setter Property="BorderThickness" Value="1" />
					<Setter Property="TabNavigation" Value="Local" />
					<Setter Property="Template">
						<Setter.Value>
							<ControlTemplate TargetType="ListBoxItem">
								<Grid Background="{TemplateBinding Background}">
									<VisualStateManager.VisualStateGroups>
										<VisualStateGroup x:Name="CommonStates">
											<VisualState x:Name="Normal" />
											<VisualState x:Name="MouseOver">
												<Storyboard>
													<DoubleAnimation Storyboard.TargetName="fillColor" Storyboard.TargetProperty="Opacity" Duration="0" To=".35" />
													<ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Visibility" Duration="0">
														<DiscreteObjectKeyFrame KeyTime="0">
															<DiscreteObjectKeyFrame.Value>
																<Visibility>Visible</Visibility>
															</DiscreteObjectKeyFrame.Value>
														</DiscreteObjectKeyFrame>
													</ObjectAnimationUsingKeyFrames>
												</Storyboard>
											</VisualState>
											<VisualState x:Name="Disabled">
												<Storyboard>
													<DoubleAnimation Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Opacity" Duration="0" To=".55" />
												</Storyboard>
											</VisualState>
										</VisualStateGroup>
										<VisualStateGroup x:Name="SelectionStates">
											<VisualState x:Name="Unselected" />
											<VisualState x:Name="Selected">
												<Storyboard>
													<DoubleAnimation Storyboard.TargetName="fillColor2" Storyboard.TargetProperty="Opacity" Duration="0" To=".75" />
												</Storyboard>
											</VisualState>
										</VisualStateGroup>
										<VisualStateGroup x:Name="FocusStates">
											<VisualState x:Name="Focused">
												<Storyboard>
													<ObjectAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Visibility" Duration="0">
														<DiscreteObjectKeyFrame KeyTime="0">
															<DiscreteObjectKeyFrame.Value>
																<Visibility>Visible</Visibility>
															</DiscreteObjectKeyFrame.Value>
														</DiscreteObjectKeyFrame>
													</ObjectAnimationUsingKeyFrames>
												</Storyboard>
											</VisualState>
											<VisualState x:Name="Unfocused" />
										</VisualStateGroup>
									</VisualStateManager.VisualStateGroups>
									<Rectangle x:Name="fillColor" IsHitTestVisible="False" Opacity="0" RadiusX="1" RadiusY="1">
										<Rectangle.Fill>
											<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
												<GradientStop Color="#FFC2DCFC" Offset="1" />
												<GradientStop Color="#FFF4F6FA" />
												<GradientStop Color="#FFD6E7FC" Offset="0.521" />
												<GradientStop Color="#FFE9F0F0" Offset="0.499" />
											</LinearGradientBrush>
										</Rectangle.Fill>
									</Rectangle>
									<Rectangle x:Name="fillColor2" Fill="#FFBADDE9" IsHitTestVisible="False" Opacity="0" RadiusX="1" RadiusY="1" />
									<ContentPresenter x:Name="contentPresenter" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
									<Rectangle x:Name="FocusVisualElement" RadiusX="1" RadiusY="1" Stroke="#7F7DA2CE" StrokeThickness="1" Visibility="Collapsed" />
								</Grid>
							</ControlTemplate>
						</Setter.Value>
					</Setter>
				</Style>
			</Setter.Value>
		</Setter>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="h:ContextMenuView">
					<Grid Margin="1" Background="Transparent">
						<ItemsPresenter Margin="{TemplateBinding Padding}" />
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!-- ActionButton -->
	<Style TargetType="h:ActionButton">
		<Setter Property="Foreground" Value="#FF000000" />
		<Setter Property="Padding" Value="6,3,6,3" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="h:ActionButton">
					<Grid>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal" />
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<DoubleAnimation Storyboard.TargetName="HoverVisualElement" Storyboard.TargetProperty="Opacity" Duration="0" To="1" />
										<DoubleAnimation Storyboard.TargetName="HoverVisualElement2" Storyboard.TargetProperty="Opacity" Duration="0" To="1" />
										<DoubleAnimationUsingKeyFrames Storyboard.TargetName="HoverBackground" Storyboard.TargetProperty="(UIElement.Opacity)" BeginTime="00:00:00" Duration="00:00:00.0010000">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1" />
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed">
									<Storyboard>
										<DoubleAnimation Storyboard.TargetName="HoverVisualElement" Storyboard.TargetProperty="Opacity" Duration="0" To="1" />
										<DoubleAnimation Storyboard.TargetName="PressedVisualElement" Storyboard.TargetProperty="Opacity" Duration="0" To="0.75" />
										<DoubleAnimation Storyboard.TargetName="PressedVisualElement2" Storyboard.TargetProperty="Opacity" Duration="0" To="1" />
										<DoubleAnimationUsingKeyFrames Storyboard.TargetName="PressedBackground" Storyboard.TargetProperty="(UIElement.Opacity)" BeginTime="00:00:00" Duration="00:00:00.0010000">
											<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.55" />
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
											<EasingDoubleKeyFrame KeyTime="0" Value="0.75" />
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
											<EasingDoubleKeyFrame KeyTime="0" Value="0.5" />
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledOverlay" Storyboard.TargetProperty="Visibility" Duration="0">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Visibility" Duration="0">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Collapsed</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused">
									<Storyboard>
										<DoubleAnimation Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity" Duration="0" To="1" />
										<DoubleAnimation Storyboard.TargetName="FocusVisualElement2" Storyboard.TargetProperty="Opacity" Duration="0" To="1" />
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Unfocused" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Border x:Name="PressedBackground" Background="#FFC4DBEF" BorderThickness="0" CornerRadius="2" Opacity="0" />
						<Border x:Name="HoverBackground" BorderThickness="0" CornerRadius="3" Opacity="0">
							<Border.Background>
								<LinearGradientBrush EndPoint=".5,1" StartPoint=".5,0">
									<GradientStop Color="#FFFCFCFC" Offset="0.0" />
									<GradientStop Color="#FFE8F2EF" Offset="0.500000000" />
									<GradientStop Color="#FFCADDEF" Offset="0.500000001" />
									<GradientStop Color="#FFC4DBEF" Offset="1" />
								</LinearGradientBrush>
							</Border.Background>
						</Border>
						<TextBlock x:Name="contentPresenter" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Text="{TemplateBinding Content}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
							<TextBlock.RenderTransform>
								<TransformGroup>
									<ScaleTransform />
									<SkewTransform />
									<RotateTransform />
									<TranslateTransform X="0" Y="0" />
								</TransformGroup>
							</TextBlock.RenderTransform>
						</TextBlock>
						<TextBlock x:Name="DisabledOverlay" Margin="{TemplateBinding Padding}" Foreground="#FFAAAAAA" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Text="{TemplateBinding Content}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Visibility="Collapsed" />
						<Rectangle x:Name="FocusVisualElement" Margin="0" IsHitTestVisible="false" Opacity="0" RadiusX="2" RadiusY="2" Stroke="#FF82A5CB" StrokeThickness="1" />
						<Rectangle x:Name="FocusVisualElement2" Margin="1" IsHitTestVisible="false" Opacity="0" RadiusX="2" RadiusY="2" Stroke="#9FFFFFFF" StrokeThickness="1" />
						<Rectangle x:Name="HoverVisualElement" Margin="0" IsHitTestVisible="false" Opacity="0" RadiusX="2" RadiusY="2" Stroke="#FF82A5CB" StrokeThickness="1" />
						<Rectangle x:Name="HoverVisualElement2" Margin="1" IsHitTestVisible="false" Opacity="0" RadiusX="2" RadiusY="2" Stroke="#9FFFFFFF" StrokeThickness="1" />
						<Border x:Name="PressedVisualElement" Margin="1" BorderBrush="#FFC0D2EC" BorderThickness="0,2,0,0" CornerRadius="2" IsHitTestVisible="false" Opacity="0" />
						<Rectangle x:Name="PressedVisualElement2" Margin="1" IsHitTestVisible="false" Opacity="0" RadiusX="2" RadiusY="2" Stroke="#FFC4DBEF" StrokeThickness="1" />
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!-- UploadControl -->
	<Style TargetType="h:UploadControl">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="h:UploadControl">
					<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">

						<VisualStateManager.VisualStateGroups>
							<!-- UploadingStates -->
							<VisualStateGroup x:Name="UploadingStates">
								<VisualState x:Name="NotStarted">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="spNoFileComment" Storyboard.TargetProperty="(UIElement.Visibility)" BeginTime="00:00:00" Duration="00:00:00.0010000">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FileListBox" Storyboard.TargetProperty="(UIElement.AllowDrop)">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<System:Boolean>True</System:Boolean>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="btnClearAll" Storyboard.TargetProperty="(UIElement.Visibility)" BeginTime="00:00:00" Duration="00:00:00.0010000">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Collapsed</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pending">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FileListBox" Storyboard.TargetProperty="(UIElement.AllowDrop)">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<System:Boolean>True</System:Boolean>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="PendingSingleFile">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FileListBox" Storyboard.TargetProperty="(UIElement.AllowDrop)">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<System:Boolean>False</System:Boolean>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="InProgress">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FileListBox" Storyboard.TargetProperty="(UIElement.AllowDrop)">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<System:Boolean>False</System:Boolean>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="btnClearAll">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Collapsed</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="grdStatus">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Canceled">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FileListBox" Storyboard.TargetProperty="(UIElement.AllowDrop)">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<System:Boolean>False</System:Boolean>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Completed">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FileListBox" Storyboard.TargetProperty="(UIElement.AllowDrop)">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<System:Boolean>False</System:Boolean>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="PartialComplete">
								</VisualState>
								<VisualState x:Name="CompletedDone">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FileListBox" Storyboard.TargetProperty="(UIElement.AllowDrop)">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<System:Boolean>False</System:Boolean>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="btnClearAll" Storyboard.TargetProperty="(UIElement.Visibility)" BeginTime="00:00:00" Duration="00:00:00.0010000">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Collapsed</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="PartialCompleteDone">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FileListBox" Storyboard.TargetProperty="(UIElement.AllowDrop)">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<System:Boolean>False</System:Boolean>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="btnClearAll" Storyboard.TargetProperty="(UIElement.Visibility)" BeginTime="00:00:00" Duration="00:00:00.0010000">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Collapsed</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="CanceledDone">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FileListBox" Storyboard.TargetProperty="(UIElement.AllowDrop)">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<System:Boolean>False</System:Boolean>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="btnClearAll" Storyboard.TargetProperty="(UIElement.Visibility)" BeginTime="00:00:00" Duration="00:00:00.0010000">
											<DiscreteObjectKeyFrame KeyTime="00:00:00">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Collapsed</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						
						<Grid x:Name="PART_ContentRoot" Background="White">

							<Grid.Resources>

								<!-- Converters -->
								<h:TransferRateConverter x:Key="TransferRateConverter" />
								<h:ByteConverter x:Key="ByteConverter" />
								<h:PercentageConverter x:Key="PercentageConverter" />
								<h:TimeConverter x:Key="TimeConverter" />
								
								<!-- ListItemBrushes -->
								<LinearGradientBrush x:Key="ListItemMouseOverBrush" EndPoint="0.5,1" StartPoint="0.5,0">
									<GradientStop Color="#FFFCFDFE" Offset="0"/>
									<GradientStop Color="#FFF2F7FE" Offset="1"/>
									<GradientStop Color="#FFF4F8FD" Offset="0.5"/>
								</LinearGradientBrush>
								<SolidColorBrush x:Key="ListItemMouseOverBorderBrush" Color="#FFB8D6FB"/>
								<LinearGradientBrush x:Key="ListItemSelectedBrush" EndPoint="0.5,1" StartPoint="0.5,0">
									<GradientStop Color="#FFC2DCFC" Offset="1"/>
									<GradientStop Color="#FFEBF3FE"/>
								</LinearGradientBrush>
								<SolidColorBrush x:Key="ListItemSelectedBorderBrush" Color="#FF7DA2CE"/>
								<SolidColorBrush x:Key="ListItemSelectedInnerBorderBrush" Color="#FFDBEAFD"/>
								
								<!-- UploadListHeaderStyle -->
								<Style x:Key="UploadListHeaderStyle" TargetType="Border">
									<Setter Property="BorderThickness" Value="0,0,1,0" />
									<Setter Property="BorderBrush">
										<Setter.Value>
											<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
												<GradientStop Color="#FF79ACF1" Offset="0" />
												<GradientStop Color="#10C2DCFF" Offset="1" />
											</LinearGradientBrush>
										</Setter.Value>
									</Setter>
								</Style>
								
							</Grid.Resources>

							<Grid.RowDefinitions>
								<!--Actions-->
								<RowDefinition Height="Auto" />
								<!--Comment-->
								<RowDefinition Height="Auto" />
								<!--Header-->
								<RowDefinition Height="Auto" />
								<!--List-->
								<RowDefinition Height="*" />
								<!--Footer-->
								<RowDefinition Height="24" />
							</Grid.RowDefinitions>

							<!--Row0: Actions-->
							<Border Grid.Row="0" BorderBrush="#FFA0AFC3" BorderThickness="0,0,0,1">
								<Border BorderBrush="#FFCDDAEA" BorderThickness="0,0,0,1">
									<Border BorderThickness="1,2,1,1">
										<Border.BorderBrush>
											<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
												<GradientStop Color="#FFF4F6FA" Offset="0" />
												<GradientStop Color="#FFE9F0F0" Offset="1" />
											</LinearGradientBrush>
										</Border.BorderBrush>
										<Border.Background>
											<LinearGradientBrush EndPoint="0.5,1" Opacity="1" StartPoint="0.5,0">
												<GradientStop Color="#FFF4F6FA" />
												<GradientStop Color="#FFE9F0F0" Offset="0.50000000" />
												<GradientStop Color="#FFDCE6F4" Offset="0.50000001" />
												<GradientStop Color="#FFDCE7F5" Offset="1" />
											</LinearGradientBrush>
										</Border.Background>
										<Grid>
											<Grid.ColumnDefinitions>
												<ColumnDefinition Width="73" />
												<ColumnDefinition Width="73" />
												<ColumnDefinition Width="73" />
												<ColumnDefinition />
											</Grid.ColumnDefinitions>
											<Grid.RowDefinitions>
												<RowDefinition Height="26" />
											</Grid.RowDefinitions>
											<h:ActionButton Grid.Column="0" ToolTipService.ToolTip="Browse for one or more file(s)." Margin="2,1,2,1" Command="{Binding BrowseCommand}" Content="Browse" />
											<h:ActionButton Grid.Column="1" ToolTipService.ToolTip="Begin uploading the files ..." Margin="2,1,2,1" Command="{Binding UploadCommand}" Content="Upload" />
											<h:ActionButton x:Name="btnClearAll" Grid.Column="2" ToolTipService.ToolTip="Clear all files ..." Margin="2,1,2,1" Command="{Binding ResetCommand}" Content="Reset" />
											<h:ActionButton Grid.Column="3" ToolTipService.ToolTip="Cancel the upload ..." Margin="2,1,2,1" Width="63" Command="{Binding CancelCommand}" Content="Cancel" HorizontalAlignment="Right" />
										</Grid>
									</Border>
								</Border>
							</Border>

							<!-- Row1: Comment -->
							<StackPanel Grid.Row="1">
								<TextBlock Margin="8,5,5,5" FontSize="14" Foreground="DarkGreen" Text="{Binding Title, FallbackValue='Title'}" TextWrapping="Wrap" VerticalAlignment="Center" />
								<TextBlock Margin="8,1,5,5" Foreground="Gray" Text="{Binding Comment, FallbackValue='comment'}" TextWrapping="Wrap" VerticalAlignment="Center" />
							</StackPanel>

							<!-- Row2: List Headers -->
							<Border Grid.Row="2" Margin="0,0,0,4" BorderThickness="0,1,0,0" HorizontalAlignment="Stretch">
								<Border.BorderBrush>
									<SolidColorBrush Color="#FF7DA2CE" Opacity="0.5" />
								</Border.BorderBrush>
								<Border.Background>
									<LinearGradientBrush EndPoint="0.5,1" Opacity="1" StartPoint="0.5,0">
										<GradientStop Color="#0FFFFFFF" Offset="1" />
										<GradientStop Color="#9FF4F6FA" />
									</LinearGradientBrush>
								</Border.Background>
								<Grid Height="24">
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="*" />
										<ColumnDefinition Width="70" />
										<ColumnDefinition Width="70" />
										<ColumnDefinition Width="65" />
										<ColumnDefinition Width="65" />
									</Grid.ColumnDefinitions>
									<Border Style="{StaticResource UploadListHeaderStyle}" x:Name="PART_FileColumnHeader" Grid.Column="0" HorizontalAlignment="Stretch">
										<TextBlock Margin="5,0,0,0" FontSize="9.5" FontWeight="Bold" Foreground="#FF1E0437" Text="File" TextAlignment="Left" VerticalAlignment="Center" />
									</Border>
									<Border Style="{StaticResource UploadListHeaderStyle}" Grid.Column="1">
										<TextBlock FontSize="9.5" FontWeight="Bold" Foreground="#FF1E0437" Text=" State" TextAlignment="Left" VerticalAlignment="Center" />
									</Border>
									<Border Style="{StaticResource UploadListHeaderStyle}" Grid.Column="2">
										<TextBlock FontSize="9.5" FontWeight="Bold" Foreground="#FF1E0437" Text=" Size" TextAlignment="Left" VerticalAlignment="Center" />
									</Border>
									<Border Style="{StaticResource UploadListHeaderStyle}" Grid.Column="3">
										<TextBlock FontSize="9.5" FontWeight="Bold" Foreground="#FF1E0437" Text=" Progress" TextAlignment="Left" VerticalAlignment="Center" />
									</Border>
									<Border Style="{StaticResource UploadListHeaderStyle}" Grid.Column="4" BorderThickness="0,0,0,0">
										<TextBlock FontSize="9.5" FontWeight="Bold" Foreground="#FF1E0437" Text=" Action" TextAlignment="Left" VerticalAlignment="Center" />
									</Border>
								</Grid>
							</Border>

							<!-- Row3: FileList -->
							<ListBox x:Name="PART_FileListBox" Grid.Row="3" Margin="0,0,0,1" BorderThickness="0" ItemsSource="{Binding Files}" SelectedItem="{Binding SelectedFile, Mode=TwoWay}">
								<ListBox.ItemContainerStyle>
									<Style TargetType="ListBoxItem">
										<Setter Property="Padding" Value="3" />
										<Setter Property="HorizontalContentAlignment" Value="Left" />
										<Setter Property="VerticalContentAlignment" Value="Top" />
										<Setter Property="Background" Value="Transparent" />
										<Setter Property="BorderThickness" Value="1" />
										<Setter Property="TabNavigation" Value="Local" />
										<Setter Property="Template">
											<Setter.Value>
												<ControlTemplate TargetType="ListBoxItem">
													<Grid Background="{TemplateBinding Background}">
														<VisualStateManager.VisualStateGroups>
															<VisualStateGroup x:Name="CommonStates">
																<VisualState x:Name="Normal" />
																<VisualState x:Name="MouseOver">
																	<Storyboard>
																		<DoubleAnimationUsingKeyFrames Storyboard.TargetName="MouseOverBorder" Storyboard.TargetProperty="(UIElement.Opacity)" BeginTime="00:00:00">
																			<SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0" />
																		</DoubleAnimationUsingKeyFrames>
																	</Storyboard>
																</VisualState>
																<VisualState x:Name="Disabled">
																	<Storyboard>
																		<DoubleAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)" BeginTime="00:00:00">
																			<SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.5" />
																		</DoubleAnimationUsingKeyFrames>
																	</Storyboard>
																</VisualState>
															</VisualStateGroup>
															<VisualStateGroup x:Name="SelectionStates">
																<VisualState x:Name="Unselected" />
																<VisualState x:Name="Selected">
																	<Storyboard>
																		<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SelectedBorder" Storyboard.TargetProperty="(UIElement.Opacity)" BeginTime="00:00:00">
																			<SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.0" />
																		</DoubleAnimationUsingKeyFrames>
																	</Storyboard>
																</VisualState>
															</VisualStateGroup>
															<VisualStateGroup x:Name="FocusStates">
																<VisualState x:Name="Focused">
																	<Storyboard />
																</VisualState>
																<VisualState x:Name="Unfocused" />
															</VisualStateGroup>
														</VisualStateManager.VisualStateGroups>
														<Border x:Name="MouseOverBorder" Background="{StaticResource ListItemMouseOverBrush}" BorderBrush="{StaticResource ListItemMouseOverBorderBrush}" BorderThickness="1,1,1,1" CornerRadius="3" Opacity="0">
															<Border BorderThickness="1" CornerRadius="2">
																<Border.BorderBrush>
																	<SolidColorBrush Color="#FFFFFFFF" />
																</Border.BorderBrush>
															</Border>
														</Border>
														<Border x:Name="SelectedBorder" Background="{StaticResource ListItemSelectedBrush}" BorderBrush="{StaticResource ListItemSelectedBorderBrush}" BorderThickness="1,1,1,1" CornerRadius="3" Opacity="0">
															<Border BorderBrush="{StaticResource ListItemSelectedInnerBorderBrush}" BorderThickness="1" CornerRadius="4" />
														</Border>
														<ContentPresenter x:Name="contentPresenter" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
														<Rectangle x:Name="FocusVisualElement" RadiusX="3" RadiusY="3" Stroke="#FF6DBDD1" StrokeThickness="1" Visibility="Collapsed" />
													</Grid>
												</ControlTemplate>
											</Setter.Value>
										</Setter>
									</Style>
								</ListBox.ItemContainerStyle>
								<h:ContextMenu.Attached>
									<h:ContextMenu UseRootVisual="False">
										<h:ContextMenu.MenuItems>
											<h:ContextMenuItem CommandName="BrowseCommand" Image="/HSS.Interlink.UI;component/assets/folder.png" Text="Browse" />
											<h:ContextMenuItem CommandName="UploadCommand" Image="/HSS.Interlink.UI;component/assets/upload.png" Text="Upload" />
											<h:Separator />
											<h:ContextMenuItem CommandName="ResetCommand" Text="Reset" />
										</h:ContextMenu.MenuItems>
									</h:ContextMenu>
								</h:ContextMenu.Attached>
							</ListBox>

							<!-- Row3: No Files -->
							<StackPanel x:Name="spNoFileComment" Grid.Row="3" Margin="20" IsHitTestVisible="False" VerticalAlignment="Top" Visibility="Collapsed">
								<TextBlock IsHitTestVisible="False" Text="No files selected" TextAlignment="Center" TextWrapping="Wrap" VerticalAlignment="Top" />
								<TextBlock Margin="20,40,0,0" IsHitTestVisible="False" Text="{Binding NoFilesText}" TextAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Center" />
							</StackPanel>

							<!-- Row4: List Footer -->
							<Border Grid.Row="4" BorderBrush="#FFA0AFC3" BorderThickness="0,1,0,0">
								<Border BorderBrush="#FFCDDAEA" BorderThickness="0,1,0,0">
									<Border Background="#FFF2F3F5" BorderThickness="1,1,1,2">
										<Border.BorderBrush>
											<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
												<GradientStop Color="#FFF4F6FA" Offset="0" />
												<GradientStop Color="#FFE9F0F0" Offset="1" />
											</LinearGradientBrush>
										</Border.BorderBrush>
										<!--Footer-->
										<Grid Margin="5,0,0,0">
											<Grid.ColumnDefinitions>
												<ColumnDefinition Width="*" />
												<ColumnDefinition Width="200" />
												<ColumnDefinition Width="80" />
											</Grid.ColumnDefinitions>

											<!-- Status -->
											<TextBlock Grid.Column="0" Foreground="Black" VerticalAlignment="Center" Text="{Binding StateFormatted}" />

											<!-- Overall progress -->
											<Grid x:Name="grdStatus" Grid.Column="1" Margin="1,2,1,1" Visibility="Collapsed">
												<ProgressBar x:Name="prgTotalProgress" HorizontalAlignment="Stretch" IsTabStop="False" LargeChange="1" Maximum="100" Minimum="0" SmallChange="1" Value="{Binding Percentage}" VerticalAlignment="Stretch" />
												<TextBlock x:Name="txtTotalProgress" Margin="0,1,0,0" FontSize="10" HorizontalAlignment="Stretch" Text="{Binding Percentage, Converter={StaticResource PercentageConverter}}" TextAlignment="Center" VerticalAlignment="Stretch" />
											</Grid>

											<!-- FileCount -->
											<StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center">
												<TextBlock Text=" | Files: " />
												<TextBlock x:Name="txtFilesCount" Text="{Binding Files.Count}" />
											</StackPanel>
										</Grid>
									</Border>
								</Border>
							</Border>

						</Grid>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>